package com.sky.service;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface ShoppingService {

    /**
     * 查看购物车
     * @return
     */
    public List<ShoppingCart> showShoppingCart();
    /**
     * 添加到购物车
     * @param dto
     * @return
     */
    public Result add( ShoppingCartDTO dto);
    /**
     * 清空购物车
     *
     * @return
     */
    void deleteShopping();
    /**
     * if>1,-1.if=1 ,delete
     * @return
     */
    public Result sub(ShoppingCartDTO dto);
}
